﻿<!DOCTYPE html>
<!--承包商名录管理-详情-->
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <style>
        .elst-select-mini {
            margin-bottom: 10px
        }
    </style>
</head>

<body>
    <div id="app" v-cloak class="popupW100">
        <el-form :model="Form" status-icon :rules="rules" ref="ruleForm" label-width="100px" size="mini"
            label-position="right">

            <el-row>
                <el-col :span="11">
                    <p class="main-label">{{ContractorDirectory.ContractorName+mark.m}}</p>
                    <p class="lh35">{{Form.cbs_list.contractorName}}</p>
                </el-col>
                <el-col :span="11" :offset="2">
                    <p class="main-label">{{ContractorDirectory.ContractorCode+mark.m}}</p>
                    <p class="lh35">{{Form.cbs_list.contractorCode}}</p>
                </el-col>

                <el-col :span="11">
                    <p class="main-label">{{ContractorDirectory.ConstructionCategory+mark.m}}</p>
                    <p class="lh35">{{Form.cbs_list.constructionCategoryName}}</p>
                </el-col>
                <el-col :span="11" :offset="2">
                    <p class="main-label">{{ContractorDirectory.PrincipalName+mark.m}}</p>
                    <p class="lh35">{{Form.cbs_list.principalName}}</p>
                </el-col>
                <el-col :span="11">
                    <p class="main-label">{{ContractorDirectory.IDNumber+mark.m}}</p>
                    <p class="lh35">{{Form.cbs_list.idNumber}}</p>
                </el-col>
                <el-col :span="11" :offset="2">
                    <p class="main-label">{{ContractorDirectory.contact+mark.m}}</p>
                    <p class="lh35">{{Form.cbs_list.phone}}</p>
                </el-col>
                <el-col :span="11">
                    <p class="main-label">{{ContractorDirectory.Qualification+mark.m}}</p>
                    <p class="lh35">{{Form.cbs_list.qualificationName}}</p>
                </el-col>
                <el-col :span="11" :offset="2">
                    <p class="main-label">{{ContractorDirectory.QualificationLevel+mark.m}}</p>
                    <p class="lh35">{{Form.cbs_list.qualificationLevel}}</p>
                </el-col>
                <!--<el-col :span="11">
        <p class="main-label">{{ContractorDirectory.Administration+mark.m}}</p>
        <p class="lh35">{{Form.cbs_list.Administration}}</p>
    </el-col>-->
                <el-col :span="24">
                    <p class="main-label">{{ContractorDirectory.TechnicalStaffSituation+mark.m}}</p>
                    <p class="lh35">{{Form.cbs_list.technicalStaffSituation}}</p>
                </el-col>
                <el-col :span="24">
                    <p class="main-label">{{ContractorDirectory.MainaAchievement+mark.m}}</p>
                    <p class="lh35">{{Form.cbs_list.mainaAchievement}}</p>
                </el-col>
            </el-row>
            <br>
            <el-row>
                <el-col span="24">
                    <el-table stripe :data="Form.cbs_list.cbS_ListAttachments" style="width: 100%">
                        <el-table-column type="index" :label="ContractorDirectory.SerialNumber" :index="indexMethod" width="50"
                           show-overflow-tooltip="true"></el-table-column>
                        <el-table-column prop="name" :label="ContractorDirectory.FileName">
                            <template slot-scope="scope">
                                <el-button type="text" @click="label_click(scope.row.path)">
                                    {{scope.row.name}}
                                </el-button>
                            </template>
                        </el-table-column>
                        <el-table-column prop="uploadTime" :label="ContractorDirectory.CreateTime":formatter="myformatDate"
                                         show-overflow-tooltip="true">
                        </el-table-column>
                        <el-table-column prop="sysUser.name" :label="ContractorDirectory.UploadUser"
                                         show-overflow-tooltip="true">
                        </el-table-column>
                    </el-table>
                </el-col>
            </el-row>
            <el-row type="flex" justify="end" style="margin-top:10px">
                <el-form-item>
                    <!--<el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnCommit}}</el-button>-->
                    <el-button type="primary" @click="onBack">{{col.btnBack}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>
        <el-dialog :title="Title" fullscreen="true" :visible.sync="ListItem.dialogVisible" @close='closeDialog'
            width="80%" height="80%" top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">

        var app = new Vue({
            el: '#app',
            data: {
                id: '',
                Title: '',
                //业务表单内容
                Form: {
                    id: guidEmpty,
                    cbs_list: {
                        contractorcode: '',
                        contractorName: '',
                        constructionCategory:'',
                        principalName: '',
                        idNumber:'',
                        phone: '',
                        qualificationName:'',
                        qualificationLevel: '',
                        constructionCategory: '',
                        technicalStaffSituation: '',
                        mainaAchievement: '',
                        cbS_ListAttachments:[],
                    },                
                },
                ConstructionCategory: [],
                CheckProjectList: [],
                ListItem: ListItem,
                PrincipalName: [],
                //表单验证
                rules: {
                    ContractorName: [
                        verification.NotNull,
                        { pattern: verification.StringLengthAtoB.t.format(2, 5), message: verification.StringLengthAtoB.m.format(2, 5), trigger: 'blur' }
                    ],
                    ContractorName: [
                        verification.NotNull,
                        { pattern: verification.StringLengthAtoB.t.format(5, 50), message: verification.StringLengthAtoB.m.format(5, 10), trigger: 'blur' }
                    ],
                    ConstructionCategory: [
                        verification.NotNull
                    ],
                    PrincipalName: [
                        verification.NotNull
                    ]
                }
            },
            mounted: function () {
                this.ConstructionCategory = getDicData('cbssglb');
                this.id = getUrlParam("id");
                this.getData();
            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                indexMethod: function (index) {
                    return (this.ListItem.currentPage - 1) * this.ListItem.pagesize + index + 1;
                },
                UserInput: function (val, id) {
                    this.Title = "上岗证照管理"
                    DialogShow(this, val, "ContractoEmploymentLicenseAdd.html", id);
                },
                //提交数据
                onSubmitForm: function (formName) {
                    var mythis = this;
                    this.$refs[formName].validate(function (valid) {
                        //验证通过
                        if (valid) {
                            onSubmitForm(this, '/api/BlackContractorDirectoryManagement/Save', mythis.Form);
                        } else {
                            //验证失败
                            return false;
                        }
                    });
                },
                getData: function () {
                    getData(this, '/api/BlackContractorDirectory/get?id=' + this.id);
                },
                label_click: function (path) {
                    location.href = path;
                },
                ContractorInput: function (val, id) {
                    this.Title = "承包商列表"
                    DialogShow(this, val, "ContractorDirectoryList.html", id);
                },
                onBack: function () {
                    parent.app.ListItem.dialogVisible = false;
                },
                deleteRow: function (index, rows) {
                    rows.splice(index, 1);
                },
            }
        });
    </script>
</body>

</html>